package org.wattdepot.cli.command;

import static org.junit.Assert.assertEquals;
import java.util.ArrayList;
import java.util.List;
import org.junit.Test;
import org.wattdepot.cli.CommandLineInterface;

/**
 * Test that checks for valid output within the TotalpowerCommand class.
 * 
 * @author Anthony Xu & John Mack
 * 
 */


public class TestTotalPower {
  /**
   * Test to see if Total power displays correct output for fueltype and time.
   * 
   * @throws Exception NotAuthorizedException, ResourceNotFoundException, BadXmlException,
   * MiscClientException.
   */
  @Test
  public void testingTotalpower() throws Exception {
    CommandLineInterface cli = new CommandLineInterface();
    List<String> commands = new ArrayList<String>();
    commands.add("totalpower");
    commands.add("SIM_KAHE_2");
    commands.add("2009-10-26T18:15:00.000-10:00");
    commands.add("fueltype");
    commands.add("waste");
    
    String theAmountOfWaste = new TotalpowerCommand().doCommand(cli, commands);
    assertEquals("correct waste output", "64.0", theAmountOfWaste);

  }


}
